package com.idol.website.controller;

import com.idol.framework.annotation.AutoWired;
import com.idol.framework.annotation.Controller;
import com.idol.framework.annotation.RequestMapping;
import com.idol.framework.annotation.Security;
import com.idol.website.service.IDemoService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author Supreme_Sir
 * @version 1.0
 * @className DemoController
 * @description
 * @date 2020/10/31 22:37
 **/
@Controller
@RequestMapping("/test")
@Security({"zhangSan", "liSi"})
public class TestController {
    @AutoWired
    private IDemoService demoService;

    @RequestMapping("/query")
    public void getName(HttpServletRequest req, HttpServletResponse resp, String name) throws IOException {
        resp.getWriter().write(demoService.getName(name));
        return;
    }
}
